home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / oper_sys / fp / ifp_unix.lzh / ifp / interp / inob.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-05-23  |  2.9 KB  |  72 lines

  1.  
  2. /****** inob.h ********************************************************/
  3. /**                                                                  **/
  4. /**                    University of Illinois                        **/
  5. /**                                                                  **/
  6. /**                Department of Computer Science                    **/
  7. /**                                                                  **/
  8. /**   Tool: IFP                         Version: 0.5                 **/
  9. /**                                                                  **/
  10. /**   Author:  Arch D. Robison          Date:   May 1, 1985          **/
  11. /**                                                                  **/
  12. /**   Revised by: Arch D. Robison       Date:  Sept 9, 1986          **/
  13. /**                                                                  **/
  14. /**   Principal Investigators: Prof. R. H. Campbell                  **/
  15. /**                            Prof. W. J. Kubitz                    **/
  16. /**                                                                  **/
  17. /**                                                                  **/
  18. /**------------------------------------------------------------------**/
  19. /**   (C) Copyright 1987  University of Illinois Board of Trustees   **/
  20. /**                       All Rights Reserved.                       **/
  21. /**********************************************************************/
  22.  
  23. #define INBUFSIZE 255     /* 65 <= INBUFSIZE <= 255 for DOS */
  24.  
  25. /*
  26.  * InDesc
  27.  *
  28.  * Input descriptor.
  29.  *
  30.  * Currently, there are three forms of IFP input:
  31.  *
  32.  *    1. Definition files
  33.  *    2. Import files
  34.  *    3. Terminal input
  35.  *
  36.  * All three forms are managed by input descriptors.  An input descriptor
  37.  * buffers the file, and keeps track of context (e.g. line number).
  38.  *
  39.  * Notes
  40.  *
  41.  *     [1] A line number of -1 indicates unnumbered lines, i.e. terminal input.
  42.  *
  43.  *     [2] ComLevel should always be zero outside of function "InBlanks()".
  44.  *          A non-zero value indicates an "open comment" error.
  45.  *
  46.  *    [3] In OOFP, this is the class name.
  47.  */
  48.  
  49. typedef struct {
  50.    char *InPtr;           /* Pointer to current character being scanned       */
  51.    int InLineNum;         /* Line number of line being read [1]               */
  52.    int ComLevel;      /* Current comment nesting level [2]              */
  53.    NodePtr InDefMod;      /* Module node of current definition being read [3] */
  54.    StrPtr InFunName;      /* Name of function definition                */
  55.    FILE *InFile;          /* File descriptor of file being read               */
  56.    char InBuf[INBUFSIZE]; /* Buffer for current line being scanned            */
  57. } InDesc;
  58.  
  59. /*
  60.  * EndOfFile
  61.  *
  62.  * Return 1 if end of file F, 0 otherwise.  
  63.  * This works anywhere except within routine "InBlanks()".
  64.  */
  65. #define EndOfFile(F) (*(F)->InPtr==0)
  66.  
  67. extern StrPtr InString ();
  68. extern char NodeDelim[];
  69.  
  70. /******************************* end of inob.h *******************************/
  71.  
  72.